home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Risc World 3
/
Risc World 3.iso
/
SOFTWARE
/
ISSUE2
/
PD
/
CAMPINS.ZIP
/
resources
/
getimgsrc
(
.txt
)
< prev
next >
Wrap
RISC OS BBC BASIC V Source
|
2002-05-20
|
3KB
|
170 lines
V 1.30
Stuart Halliday
finds string and then looks for the first 'SRC' forward and gets that url
if string starts with '--' then searchs backwards to find 'SRC'
"err:";
;" at ";
buffer% 512
"OS_GetEnv"
buffer%
command$=
getstring(buffer%)
3path$=
command$,
(command$)-
command$,""" ")-1)
path$,1)=
path$=
path$,2)
path$,1)=
path$=
path$,
path$-1)
string$=path$
string$,2)="--"
string$=
string$,3)
negsearch%=
negsearch%=
PRINT string$
"OS_GSTrans","<campin$dir>",buffer%,512
+todaypath$=
getstring(buffer%)+".today"
"OS_Find",&40,todaypath$
handle%
length%=
string$
string$,A%,1)
M$=
string$,A%,1)
C$=
#handle%
C$=M$
PRINT C$;
A%+=1
A%=1
.
#handle%
A%>length%
PRINT PTR#handle%, A%,length%,M$,negsearch%
A%> length%
negsearch%=
flag%=
7
pos%=
#handle%
#handle%=pos%-1
:q
uppercase(
#handle%))="S"
uppercase(
#handle%))="R"
uppercase(
#handle%))="C"
flag%=
pos%=
#handle%
#handle%=pos%-3
>
#handle% <9
flag%=
pos%=
#handle%
#handle%=pos%-1
PRINT PTR#handle%
post%=
gotoendof("SRC")
PRINT post%
H
dummy$=
#handle%)
J?
dummy$<>
dummy$<>" "
dummy$<>"'"
dummy$<>"="
pos%=
#handle%
#handle%=pos%-1
string$=
getfile
VDU4: PRINT ">>";string$;"<<" :VDU5
("set URLstring "+string$)
("unset URLstring" )
PRINT ">>";string$;"<<"
#handle%
gotoendof(text$)
length%
length%=
text$
text$=
uppercase(text$)
M$=
text$,A%,1)
c& C$=
uppercase(
#handle%))
PRINT C$;
C$=M$
A%+=1
A%=1
#handle%
A%>length%
A%>length%
post%=
#handle%
post%=0
=post%
getfile
length%,text$
C$=
#handle%)
C$<>
C$ <> " "
C$ <> "<"
C$ <> "'"
text$+=C$
#handle%
C$=" "
C$=">"
C$="'"
=text$
getstring(ptr%)
~ p$=""
(?ptr%>31
?ptr%<256)
(p$)<255
c%=?ptr%
IF c%>=97 AND c%<=122 THEN c%-=32
p$+=
ptr%+=1
uppercase(text$)
ntext$,r$,L%
ntext$="":r$=""
text$
loop%=1
text$,loop%,1))
a% >= 65
a% <= 122
(a%
32) = 32
a%> 64
a%<123
a%=a%-32
a%>223
a%<255
a%=a%-32
IF a%=34 THEN a%=ASC("|")
ntext$+=r$
=ntext$